package com.udistrital.framework.comun.dao;

import javax.persistence.EntityManager;

/**
 * Dao Base
 * @author ccadavid
 *
 */
public abstract class DaoBase {
	
    protected EntityManager manager;
    
    protected DaoBase(EntityManager manager) {
        this.manager = manager;
    }

    protected void eliminarEntity(Object entity, Object idEntity) {
        entity = manager.getReference(entity.getClass(), idEntity);
        manager.remove(entity);
    }
    
}
